'''
Author: admin@attacker.club
Date: 2022-08-02 13:41:10
LastEditTime: 2022-08-02 15:19:57
Description: 
'''


import os
import sys
import os.path as op
level5 = op.abspath(op.join(__file__, op.pardir, op.pardir, op.pardir, op.pardir, op.pardir))
sys.path.append(level5)
import DescribeSlowLogRecords

from globalConfig import ALIYUN_CONFIG,WXWork_CONFIG
if __name__ == '__main__':
    UniqueList = []
    
    for account in ALIYUN_CONFIG:
        accessKeyId = ALIYUN_CONFIG[account]['accesskey']
        ## 相同AK只匹配一次
        if accessKeyId not in UniqueList: 
            UniqueList.append(accessKeyId)
            secret= ALIYUN_CONFIG[account]['secret']
            info = ("当前账号: [ {0} ] AK账号: {1} / {2}".format(account,accessKeyId, secret.replace(secret[:20],'*'*len(secret[:20]))) )
          
            if len(ALIYUN_CONFIG[account]["rds"])>0:
                # 参数: accesskey,secret,region,InstanceId,DBName
                ret = DescribeSlowLogRecords.toDO(
                    accessKeyId,
                    secret,
                    "cn-shanghai",
                    "rds6otjyfivs849p24y4",  
                    "2022-07-25T09:00Z",  
                     "2022-08-01T10:00Z",   
            )


            
            
   



